<?php

declare(strict_types=1);

namespace DreamCat\StateMachine;

use DreamCat\StateMachine\Factory\MachineFactory;
use DreamCat\StateMachine\Popo\MachineDefine;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\ContainerInterface;
use Psr\Container\NotFoundExceptionInterface;

/**
 * 状态机汇总提供器
 * @author vijay
 */
interface StateMachineProviderInterface
{
    /**
     * 解析后的定义
     * @return MachineDefine
     */
    public function define(): MachineDefine;

    /**
     * 获取状态机工厂
     * @return MachineFactory
     * @throws ContainerExceptionInterface
     * @throws NotFoundExceptionInterface
     */
    public function factory(): MachineFactory;

    /**
     * IoC容器
     * @return ContainerInterface
     */
    public function container(): ContainerInterface;

    /**
     * 转换器
     * @return StateMachineTransferInterface
     */
    public function transfer(): StateMachineTransferInterface;
}

# end of file
